package com.example.prom.ok.y2023.work.telesign;

import com.alibaba.fastjson.JSON;
import com.telesign.MessagingClient;
import com.telesign.RestClient;

import java.io.IOException;
import java.security.GeneralSecurityException;
import java.util.HashMap;

public class TelesignController {
    public static void main(String[] args) throws IOException, GeneralSecurityException {
        HashMap<String, String> params = new HashMap<>();
        params.put("verify_code", "112121");
        params.put("language", "tr");
//        messagingClient.message(phoneNumber, message, messageType, params);
        MessagingClient messagingClient = new MessagingClient("0A29CFDE-6C3B-4449-AE26-7A5A5C73BA42",
                "wgGFOdY2m49tdnzzGMR4LE5MvWqKZfETGyDbeoFz5kFNz0Vp8QX+avjvfgqEdkyDb6z9c8ZMWdavzgNY/s3Hfw==", "https://rest-ww.telesign.com");
        RestClient.TelesignResponse telesignResponse = messagingClient.message("8615104425928", "您的验证码是：123456", "OTP", params);
        System.out.println(telesignResponse.toString());
    }
}
